package com.zksk.admin.api.factory;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zksk.admin.api.RemotePublicityService;
import com.zksk.admin.api.domain.portal.vo.SanctionsRequestVo;
import com.zksk.admin.api.domain.portal.vo.ViolateRequestVo;
import com.zksk.common.core.domain.R;
import com.zksk.mbg.admin.domain.Sanctions;
import com.zksk.mbg.admin.domain.Violate;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class RemotePublicityFallbackFactory implements FallbackFactory<RemotePublicityService>

{
    private static final Logger log = LoggerFactory.getLogger(RemotePublicityFallbackFactory.class);

    @Override
    public RemotePublicityService create(Throwable throwable)
    {
        log.error("系统模块调用失败:{}", throwable.getMessage());
        return new RemotePublicityService()
        {

            @Override
            public R<Page<Violate>> violatePage(ViolateRequestVo requestVo, String source) {
                return null;
            }

            @Override
            public R<Violate> selectViolate(Long violateId, String source) {
                return null;
            }

            @Override
            public R<Page<Sanctions>> sanctionsPage(SanctionsRequestVo requestVo, String source) {
                return null;
            }

            @Override
            public R<Sanctions> selectSanctions(Long sanctionsId, String source) {
                return null;
            }
        };
    }
}
